package com.weds.data_sync.pojo.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * <p>
 * 数据同步-数据库信息
 * </p>
 *
 * @author lhw
 * @since 2023-12-29
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "DataSyncDbInfoDO", description = "数据同步-数据库信息")
public class DataSyncDbInfoDTO {

    @Schema(description = "数据库id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private Long id;

    @Schema(description = "数据库id数组【批量删除用】")
    private List<Long> ids;

    @NotNull(message = "数据库类型不能为空")
    @Schema(description = "数据库类型 1:pg,2:mysql【字典】")
    private Integer dbType;

    @NotBlank(message = "数据库ip地址不能为空")
    @Schema(description = "ip地址")
    private String ip;

    @NotBlank(message = "数据库端口号地址不能为空")
    @Schema(description = "端口号")
    private String port;

    @NotBlank(message = "数据库用户名地址不能为空")
    @Schema(description = "用户名")
    private String username;

    @NotBlank(message = "数据库密码地址不能为空")
    @Schema(description = "密码")
    private String password;

    @NotNull(message = "数据库分类地址不能为空")
    @Schema(description = "数据源分类: 1 业务库 2 前置库 3 三方库")
    private Integer dsType;

}
